//
//  ModelOfForum_thread_listData.m
//  FreeTravel
//
//  Created by 徐康 on 16/9/12.
//  Copyright © 2016年 KX. All rights reserved.
//
#import "ModelOfForum_thread_listEntry.h"
#import "ModelOfForum_thread_listData.h"
#import "ModelOfForum_thread_listTypes.h"
@implementation ModelOfForum_thread_listData
- (void)setValue:(id)value forKey:(NSString *)key{
    [super setValue:value forKey:key];
    NSMutableArray *arr1 = [NSMutableArray array];
    NSMutableArray *arr2 = [NSMutableArray array];
    
    if ([key isEqualToString:@"total"]) {
        self.total = [value integerValue];
    }if ([key isEqualToString:@"description"]) {
        self.Description = value;
    }if ([key isEqualToString:@"entry"]) {
        for (NSDictionary *dic in value) {
            ModelOfForum_thread_listEntry *model = [ModelOfForum_thread_listEntry modelWithDic:dic];
            [arr1 addObject:model];
        }
        self.entry = arr1;
    }if ([key isEqualToString:@"types"]) {
        for (NSDictionary *dic in value) {
            ModelOfForum_thread_listTypes *model = [ModelOfForum_thread_listTypes modelWithDic:dic];
            [arr2 addObject:model];
        }
        self.types = arr2;
    }
}
@end
